home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / blitz-list200994.lha / blitz-list / 000549_blitz-list-request_Fri Aug 26 11:11:39 1994.msg < prev    next >
Internet Message Format  |  1994-09-20  |  3KB

  1. Received: from mhs.swan.ac.uk (mhs.swan.ac.uk [137.44.1.33]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id LAA10300 for <blitz-list@helsinki.fi>; Fri, 26 Aug 1994 11:11:09 +0300
  2. Received: from ce1.swan.ac.uk by mhs.swan.ac.uk with SMTP (PP) 
  3.           id <16658-0@mhs.swan.ac.uk>; Fri, 26 Aug 1994 09:11:01 +0100
  4. Received: from CE1/MERCURY by CE1.SWAN.AC.UK (Mercury 1.12);
  5.           Fri, 26 Aug 94 9:18:03 GMT0BST
  6. Received: from MERCURY by CE1 (Mercury 1.12); Fri, 26 Aug 94 9:17:55 GMT0BST
  7. From: Martin Kift <M.H.Kift@swansea.ac.uk>
  8. To: James Savage <James.Savage@blitz.centron.com>
  9. Date: Fri, 26 Aug 1994 09:17:47 GMT0BST
  10. Subject: Re: DisplayLib Fades
  11. CC: blitz-list@helsinki.fi
  12. Priority: normal
  13. X-mailer: Pegasus Mail/Windows v1.11
  14. Message-ID: <F18E446924@CE1.SWAN.AC.UK>
  15. MIME-Version: 1.0
  16. Content-Type: text/plain; charset="us-ascii"
  17. Content-Transfer-Encoding: 7bit
  18. X-Status: 
  19. Status: RO
  20.  
  21. > I've just been messing with DisplayLib and I can set up a 320x256x8
  22. > display, but I really want to fade a bitmap on and off it. FadeIn and
  23. > FadeOut don't work, is there an alternative?
  24.  
  25. Use the RIBlitzLibs commands PalInfo and PalAdjust. HAng on, I'll try 
  26. and write some code now, although its bound not to work since I don't 
  27. have my manual in front of me. 8) SOrry for mistakes, but I'm sure 
  28. Steve will correct me if I get it wrong, he loves doing that 8)
  29.  
  30. ; I always render to a separate pal, to maintain the original
  31. ; although you can do this in one pal if you want. If you render
  32. ; to a separate pal, make sure it has the same number of colours.
  33.  
  34. ; the delay param should be a small number. You can also change the
  35. ; rate by altering the step number, I typically use 0.02 or 4 etc
  36.  
  37. ; remember to have your bitmap set to black first. Looks nicer.
  38. statement MyFadeIn{coplist.b,srcpal.w,targetpal.w,delay.w}
  39.   PalInfo srcpal
  40.  
  41.   for i=0 to 1 step 0.01
  42.     PalAdjust i,targetpal
  43.     DisplayPalette coplist,targetpal
  44.     vwait delay
  45.   next i
  46. end statement
  47.  
  48. statement MyFadeOut{coplist.b,srcpal.w,targetpal.w,delay.w}
  49.   PalInfo srcpal
  50.  
  51.   for i=1 to 0 step -0.01
  52.     PalAdjust i,targetpal
  53.     DisplayPalette coplist,targetpal
  54.     vwait delay
  55.   next i
  56. end statement
  57.  
  58. +---------------------------------+---------------------------------------+
  59. | Martin Kift                     |   Software developer (C/C++/OWL/MFC)  |
  60. | Email: M.H.Kift@swansea.ac.uk   |   Procede Software Ltd., UK.          |
  61. +---------------------------------+---------------------------------------+
  62.